this breaks everything

this commit breaks every AF based code before the commit. But it's
really necessary to do this change, to be able to implement application
threads.