thread-safe Gearman client

part 3/3: cf1dcf31d0b1845ed4d5e6e5312c8f44ecd1cade