Simplified using a PickableMethod type.
Removed unused code.
Better interface for the 'Semaphore' (Lock) we use.
Using the Lock-interface in the snake module.
Better error message, when you want to defer something you can't.

Usually it is a typo: you type task(A(1, 2)) instead of task(A, 1, 2).
The Lock has a protect method.