Implemented stubs for Thread and Task.