Semaphore

In reply to timag:

Hello all, Why not simply declaring those pop and push function as tasks? Having a function that does it for you could cause issues due to the 0 delay execution which is dangerous in case of loops. Is there amy restrictions in using function instead of task ?.

Trying to call try_get and try_put i believe could cause some clashes since a 0 delay function could be executed before another in a not known manner i believe. Regards