On Fri, 24 Jan 2014 13:27:15 GMT, Cruz Bishop wrote:
Never mind :)
I just discovered getTaskLocal and setTaskLocal.
If this works for your use case, have a look at TaskLocal!T. It's the more efficient and type safe successor of those two functions.
I would have expected the associative array to work, too, but maybe the hash function behaves strangely for interfaces. You could try to use a T[void*]
instead of T[TCPConnection]
and explicitly cast the connection to void*
when accessing the AA.