As everybody knows that node.js is an event-driven programming language. It's hard for us to trace messages.
Transactions can be intersected, makes it impossible to know which transaction is the parent of another one.
It caused problems, so we fallback the default mode to **atomic**, which means all messages will be sent immediately after it has been completed.
As the message tree is useful in some cases, we have introduced a brand new **Thread Mode** in this version.
In this mode, the **first** transaction will be the **root** transaction, all the following transactions and events will become its child nodes. Instead of being sent after themselves have been completed, the entire message tree will be sent after the root transaction (their parent) has been completed.
Here is the example usage.
```js
varcat=require('../lib')
cat.init({
appkey:'nodecat'
})
cat=newcat.Cat(true)
leta=cat.newTransaction("Context","A")
letb=cat.newTransaction("Context","B")
letc=cat.newTransaction("Context","C")
setTimeout(function(){
b.complete()
},1000)
setTimeout(function(){
c.complete()
},1500)
setTimeout(function(){
a.complete()
console.log("a complete")
},2000)
```
## Requirements
The `nodecat` required `libcatclient.so` to be installed in `LD_LIBRARY_PATH`.