New generic wrapper for providing an easier API to web workers