[Mono-devel-list] Thread SpinWait not supported? Interrupt ?

ted leslie tleslie at tcn.net
Sun Jul 31 02:36:30 EDT 2005


Unhandled Exception: System.NotImplementedException: The requested feature is not implemented.
in <0x0001d> System.Threading.Thread:SpinWait (Int32 iterations)
in <0x00072> ServerClass:StaticMethod ()
in (wrapper delegate-invoke) System.MulticastDelegate:invoke_void ()


I tried a Thread.SpinWait / Interrupt demo program ...
and mono doesn't support SpinWait ? Its an inefficent function, but if someone were to use it
in MS .Net and expect there code to work on Mono? 

Then having said that,  SpinWait and Interrupt seem to be a matching pair,
so without SpinWait, what is Interrupt going to be used for? It doesn't seem to Interrupt Sleep().

Search of archives shows 2002/2003 mail-list items saying its a TODO, and not high priority ....

I have read some workarounds, but I can't help but think if  Interrupt is supposed to also interrupt a Sleep,
this would be handy.

Is there a big implementation delima? Or is it not considered a high priority?

On to the suggested work around ................... 
--------------------------------------------------------------------
On Fri, 2003-02-28 at 11:53, Yury Serdyuk wrote:
> Hi !
> 
> We see in the "List of not-implemented classes" that
> the Interrupt - method didn't realized yet.
> In particular, the following program  doesn't work properly  :
> 
> But this function is very important for multithreading applications.
> So,  tell us about the current status of this problem,

Thread.Interrupt() has not been implemented, and it is way down on my
todo list.

> or is there a walk-around of it ?

Use events to signal state changes between threads?

- Dick
------------------------------------------------------------------------

-tl






More information about the Mono-devel-list mailing list