Added thread pooling funcs
Added pooled test