Allow to use two different modes. One which will call the callbacks in the io thread and the other mode which will submit to the worker