It appears that System.Random would provide an acceptable means through
which to generate a unique value used to identify multiple/concurrent
asynchronous tasks.
The usage of the value under consideration here is that it is supplied to
the AsyncOperationM anager.CreateOp eration(userSup pliedState) method... with
userSuppliedSta te being, more or less, a taskId.
In this case, the userSuppliedSta te {really taskId} is of the object type,
and could therefore be just about anything. Consequently it appears to me
that a unique integer as generated by System.Random would suffice (and yes,
I understand that System.Random doesn't provide *truly* random values).
Would you concur that System.Random would be "good enough" - or would you
recommend some better alternative for generating the taskId?
Thanks!
which to generate a unique value used to identify multiple/concurrent
asynchronous tasks.
The usage of the value under consideration here is that it is supplied to
the AsyncOperationM anager.CreateOp eration(userSup pliedState) method... with
userSuppliedSta te being, more or less, a taskId.
In this case, the userSuppliedSta te {really taskId} is of the object type,
and could therefore be just about anything. Consequently it appears to me
that a unique integer as generated by System.Random would suffice (and yes,
I understand that System.Random doesn't provide *truly* random values).
Would you concur that System.Random would be "good enough" - or would you
recommend some better alternative for generating the taskId?
Thanks!
Comment