Unclear if there are ccr gurus here but let's try anyway.
I have this function in my code:
dq.EnqueueTimer(TimeSpan.FromMilliseconds(TIMEOUT), timeOutFn);
which will call my function after the timeout. However since I need this timer on a lot of open sockets, I would like to pass a parameter(or ID) to the timer function.
How do you do this?
Thanks
R
Something like this should do it.
var timerPort = new Port<DateTime>();
dq.EnqueueTimer(TimeSpan.FromMilliseconds(TIMEOUT), timerPort);
timerPort.Receive(ignored => MyFunc(myParam));