Patch for Review: Thread.interrupt() for MinGW

Bryce McKinlay bryce@mckinlay.net.nz
Thu Sep 18 11:10:00 GMT 2003


On Monday, Sep 15, 2003, at 19:12 Pacific/Auckland, Mohan Embar wrote:

> This patch attempts to implement Thread.interrupt() on MinGW.

Have you run this against the Thread tests in the libjava testsuite? 
How does it do on those? I think I've got a few other stress tests for 
Thread.Interrupt lying around somewhere, I'll see if I can dig them up 
tomorrow if you want to try them.

> ChangeLog
> 2003-09-15  Mohan Embar  <gnustuff@thisiscool.com>
>
> 	* win32-threads.cc: (ensure_interrupt_event_initialized) New
> 	function for lazy initialization of an auto-reset event.

Why lazy initialization - wouldn't it be cleaner to set this up during 
thread initialization? IIRC there is a hook in the threads interface 
for exactly that.

> 	(_Jv_GetInterruptEvent) Declared new method for returning interrupt
> 	event to an external caller.

This would be better called _Jv_Win32GetInterruptEvent or some such, to 
emphasize that its win32 specific and not part of the standard 
interface.

Regards

Bryce.



More information about the Java-patches mailing list