(1) Is qelem_unset() automatically called when we call qelem_free(), or do we have to call this separately?
(2) The SDK (5.1.7) says in the description of the qelem_set() function:
A Qelem object is unset after its queue function has been called.
This is a bit confusing. What happens if another thread sets the qelem agan while the qelem task function is executing? According to the description, this should happen in that case:
(1) The qelem is set by some function.
(2) The qelem task function is executed at some point.
(3) In the meantime, the qelem will be set by another function in another thread.
(4) The qelem task function finishes its execution.
(5) The qelem will be unset.
If this is really the scenario, then this means that the second qelem call will simply 'be lost' and one will need to wait until somebody makes another qelem call, which is really, really weird...
Thanks for clarification,