Changeset 11 in libcf++ for trunk/src/task.cpp


Ignore:
Timestamp:
06/08/15 21:27:49 (9 years ago)
Author:
cheese
Message:

#1 add new interfaces for bin and task

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/task.cpp

    r4 r11  
    145145    : mSynchronizer(inst)
    146146{
    147     if (!synchronizer())
     147    if (!mSynchronizer)
    148148        THROW_EXCEPTION("invalid synchronizer");
    149149
    150     synchronizer()->lock();
     150    mSynchronizer->lock();
    151151}
    152152
     
    155155    try
    156156    {
    157         synchronizer()->unlock();
     157        unlock();
    158158    }
    159159    catch (...)
     
    162162}
    163163
    164 cf::task::ISynchronizer * cf::task::scopedLock::synchronizer()
    165 {
    166     return mSynchronizer;
     164cf::bool_t cf::task::scopedLock::locked() const
     165{
     166    return mSynchronizer->locked();
     167}
     168
     169cf::void_t cf::task::scopedLock::unlock()
     170    throw (cf::exception)
     171{
     172    mSynchronizer->unlock();
    167173}
    168174
Note: See TracChangeset for help on using the changeset viewer.