Merge Request #15 - December¶
Features¶
- Future: always respect synchronicity of callbacks, when a connection is made sync, the callback is guaranteed to run synchronously on the promise.setValue() thread or on the future.connect thread
- String registration: allow implementation to make a copy of the string
- qi::Path: considered as a string in the typesystem
- ObjectTypeBuilder: support adding a description for the object
- Gateway: reconnect a few times before giving up
- Python: added stack trace to errors
- Python: bind qi::File in qicore
- qi::File: remove preparedCopyToLocal() function, replaced by FileCopyToLocal type
- qi::File: FileOperation does not inherit anymore from ProgressNotifier, but it provides a ProgressNotifier through its notifier() member function
- qi::File: ProgressNotifier and File member functions starting with underscore have been renamed to the same without the underscore
- Support boost 1.59
New C++11 API for threading¶
A big part of the threading code has been rewritten to take advantage of C++11 features. All functions that needed the return type to be specified (like async, thenR, bind, etc) now have a replacement that does not need it to be specified.
Actors are now more powerful. You do not need to inherit from Trackable
anymore (and your actor won’t work if you do). This has fixed a lot of bugs,
including compilation errors in some cases and crashes in some other cases.
When you use qi::bind on an actor now, the call will be stranded, which makes things way easier to write:
signal.connect(qi::bind(&Class::method, myActor));
future.then(qi::bind(&Class::method2, myActor, _1));
Strand::schedulerFor
is now most of the time useless since qi::bind
does
almost the same thing.
Deprecations¶
qi::ApplicationSession::start
has been replaced byqi::ApplicationSession::startSession
Future::thenR
has been replaced byFuture::then
, you don’t need to specify template argumentsFuture::andThenR
has been replaced byFuture::andThen
, you don’t need to specify template arguments- You don’t need to specify template arguments to
qi::bind
and friends (unless it is the return type, in the same cases asboost::bind
) - You don’t need to specify template arguments to
qi::track
and friends - You don’t need to specify template arguments to all
async
functions - All
async(Functor, Duration)
have been replaced byasyncDelay(Functor, Duration)
- All
async(Functor, TimePoint)
have been replaced byasyncAt(Functor, TimePoint)
- Most of new functions are not variadic, use
qi::bind
if you need QI_TYPE_ENUM_REGISTER
has been replaced byQI_TYPE_ENUM
and is meant to be put in header filesSession::callModule
has been replaced bySession::asyncCallModule
, the behavior has not changed, the call has always been asynchronousFuture::isCancelable
has become useless, all futures are now cancelable
Bugfixes¶
- Future: if uninitialized, methods will throw (instead of deadlocking)
- Object: change cast operators and operator-> to be const, Object has a shared pointer semantic
- Gateway: fix various crashes
- Signature: support 16 bit types
- Python: fix bug when a method returns a Future which had an incomplete interface
- Python: fix FutureBarrier which always finished with an error
- Python: avoid throwing an error in logging in some cases
- Python: restore old findData interface
- Python: fix potential deadlock when destroying a strand