Basic threadpool with simple lock.