Update for 0.10 and for better support when working with different threads but one context (i.e. inproc needs this)