Added a low level scheduler example using pthread.

Review: https://reviews.apache.org/r/23216