Fix bugs in the Worker, add tests.

This commit is contained in:
André Cruz
2013-04-20 01:39:39 +01:00
parent 05d974578d
commit 99af52ac2f
4 changed files with 286 additions and 441 deletions

View File

@@ -311,7 +311,7 @@ var worker = new Worker(15, {
`Worker#enqueue(func, [type])`: Promise
Enqueues a function to be ran. The function is expected to return a promise.
Enqueues a function to be ran. The function is expected to return a promise or a value.
The returned promise is resolved when the function promise is also resolved.
The `type` argument is optional and can be a `string` or an array of `strings`.