Added rudimentary threading support (connection global lock around sending call)