Ignore:
Timestamp:
Jan 9, 2017, 11:09:38 AM (3 years ago)
Author:
jrpelegrina
Message:

Update new version: 3.15.02

File:
1 edited

Legend:

Unmodified
Added
Removed
  • filezilla/trunk/fuentes/src/engine/ratelimiter.h

    r130 r3185  
    99
    1010// This class implements a simple rate limiter based on the Token Bucket algorithm.
    11 class CRateLimiter final : protected CEventHandler, COptionChangeEventHandler
     11class CRateLimiter final : protected fz::event_handler, COptionChangeEventHandler
    1212{
    1313public:
    14         CRateLimiter(CEventLoop& loop, COptionsBase& options);
     14        CRateLimiter(fz::event_loop& loop, COptionsBase& options);
    1515        ~CRateLimiter();
    1616
     
    3232        std::list<CRateLimiterObject*> m_wakeupList[2];
    3333
    34         timer_id m_timer{};
     34        fz::timer_id m_timer{};
    3535
    3636        int64_t m_tokenDebt[2];
     
    3838        COptionsBase& options_;
    3939
    40         void WakeupWaitingObjects(scoped_lock & l);
     40        void WakeupWaitingObjects(fz::scoped_lock & l);
    4141
    4242        void OnOptionsChanged(changed_options_t const& options);
    4343
    44         void operator()(CEventBase const& ev);
    45         void OnTimer(timer_id id);
     44        void operator()(fz::event_base const& ev);
     45        void OnTimer(fz::timer_id id);
    4646        void OnRateChanged();
    4747
    48         mutex sync_;
     48        fz::mutex sync_;
    4949};
    5050
    5151struct ratelimit_changed_event_type{};
    52 typedef CEvent<ratelimit_changed_event_type> CRateLimitChangedEvent;
     52typedef fz::simple_event<ratelimit_changed_event_type> CRateLimitChangedEvent;
    5353
    5454class CRateLimiterObject
Note: See TracChangeset for help on using the changeset viewer.