I've pushed modified version of your patches, here's a short description of changes: - remove unneeded changes from this series (e.g. ExceptionPtr class is not used yet) - don't call Scheduler_Attach when adding new task - this part is a little tricky, in your implementation we might leak scheduler reference if ScheduleTask fails, changed code depends on scheduler task running under the same scheduler that creates it (which is not enforced yet but should be true in most cases)
Does it look good for you?