Changed locking behavior. Contexts can now be created/used across tasks safely.