added simple task queue

fixes https://github.com/zyndiecate/matic/issues/2
You might have a race condition here, if multiple tasks throw an error concurrently.