Closed rjeczalik closed 8 years ago
Could you please write a simple test to validate it is working as expected? like writing a two handler one waits for 100ms other returns immediately, and assert that second handler's response returns after first ones.
Thanks for fixing this long standing issue on upgrading our go version :)
@cihangir Will do.
deps: https://github.com/koding/kite/pull/171
The default behaviour for go1.4 scheduler is to execute incoming callback in order they were received. That applies to small group of short-lived callbacks that don't do any I/O.
go1.5+ scheduler is more reentrant, which makes callback execution out-of-order. This breaks existing code that relies on go1.4 scheduler behaviour.
This PR adds ConcurrentCallbacks field to client which is false by default to restore go1.4 behaviour.
If you rely on your callbacks being done asynchronously (e.g. you're doing heavy computations in them) set ConcurrentCallbacks to true for each your *kite.Client value.