cdmf-agent-android
cdmf-agent-android copied to clipboard
IdentityProxy is not thread safe ?
Hi, I noticed that IdProxy can be called from APIController.invokeAPI in different contexts (threads). Setting requestcode for singleton IdentityProxy is not thread safe : IdentityProxy.getInstance().setRequestCode(requestCode);
Please tell us if assigning a value to this requestCode attribute in a multithreaded context could or not produce an inconsistent result?
Is this a bug or not? It is good to know if it is necessary to correct it.
Hi @yhilem,
As you have pointed out current singleton implementation is not thread safe. So it need be fixed to ensure thread safety.
As per the current implementation requestCode attribute is used to track down the request. In API result call backs there are conditions to track the request.
We will keep open this issue until proper fix is introduced.
Thanks & regards, /Charitha
Thank you.