run: test for main thread_base object
base: generic main thread setup code
foc: handle main thread inside context area

Issue #540
nova: handle main thread inside context area

Issue #540