Since the .NET Micro Framework only has ThreadStart and not ParameterizedThreadStart, how are you guys passing parameters to your threads? The idea is the Netduino acts as a server, flags a custom EventHandler when a request is received, and passes the request along to be processed on a separate thread.
I'm used to doing something like this:
public static void Main() { ... // Watch for requests server.Request += new RequestEventHandler(server_Request); ... } static void server_Request(object sender, RequestEventArgs e) { // Process the request on a new thread ParameterizedThreadStart threadStart = new ParameterizedThreadStart(ProcessRequest); Thread thread = new Thread(threadStart); thread.Start(e.Request); } static void ProcessRequest(object request) { ... }
Any ideas?
- NICK