Skip to content

Commit

Permalink
changelog updated
Browse files Browse the repository at this point in the history
  • Loading branch information
ktrzeciaknubisa committed May 27, 2015
1 parent df77a3d commit c19460b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 33 deletions.
35 changes: 2 additions & 33 deletions doc/api/jxcore-tasks.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -163,28 +163,9 @@ jxcore.tasks.addTask(method, { str: "hello" }, function (err, result) {
});
```

There is also an alternative way to run a function as a task. See below for `method.runTask()`.

### method.runTask(param, callback)

* `param` {Object}
* `callback` {Function} [optional]

This is shorter alternative to `tasks.addTask()`.
JXcore adds `runTask()` method to function's prototype, so each function can be added as a task directly by calling `method.runTask()`:

```js
var method = function (param) {
console.log("We are in a sub-instance now. Argument value is:", param);
return "ok";
};

var callback = function (err, result) {
console.log(result);
};

method.runTask({ str: "hello" }, callback);
```
This method is removed as of v0.3.0.1.

## tasks.addTask(object, param, callback)

Expand Down Expand Up @@ -441,19 +422,7 @@ If this is not convenient for your scenario, you may check whether the define ha

### method.runOnce(param, doNotRemember)

* `param` {Object} - Argument for that method.
* `doNotRemember` {Boolean}

This is shorter alternative to `tasks.runOnce()`.
JXcore adds `runOnce()` method to function's prototype, so each function can be added as a task directly by calling `method.runOnce()`:

```js
var method = function (param) {
console.log("Sub-instance no " + process.threadId + ". Argument value is:", param);
};

method.runOnce("hello");
```
This method is removed as of v0.3.0.1.

## tasks.setThreadCount(value)

Expand Down
3 changes: 3 additions & 0 deletions releaseLogs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ JXcore (http://jxcore.io)
- new 'jx npm' command for accessing 'npm'
- jxcore.tasks : Conform to node-style callbacks (special thanks to @zamb3zi)
- native interface stability updates
- http.setMaxHeaderLength fixes for SM
- tasking helpers removed from function prototype (runTask/runOnce)
- monitor restart command fixed

----JXcore 3.0.0

Expand Down

0 comments on commit c19460b

Please sign in to comment.