first try for a threaded event dispatcher, but this is not correctly working right now.