Hi Chris,

Objects or values are not associated with a particular thread, therefore I don't know what is meant by "this should reside on Thread 2".

However, I think what you are looking for is a way to have event handlers run asynchronously from the thread that triggers them. The easiest way to do this is with this code:

member x.onRecognizer(s:string) = System.Threading.ThreadPool.QueueUserWorkItem(fun _ -> (fst x.pair) s)

If you need more control over the process, a more complicated approach is to create your own thread(s) dedicated to running event handlers and manage a queue to pass event messages to them.

- Greg

By on 4/7/2007 8:40 PM ()

Greg,

Thanks for the reply.

Regards

Chris

By on 4/10/2007 1:27 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper