Feature #2295
closedScheduler: ScopedEventId
100%
Description
Develop a ScopedEventId type which stores an EventId and cancels it upon destruction.
ScopedEventIdis default constructible; it doesn't contain anEventIdwhen default constructedScopedEventIdis implicitly constructible fromEventIdScopedEventIdis assignable fromEventId- when
ScopedEventIdis destructed, theEventIdit holds is cancelled - when a different
EventIdis assigned toScopedEventId, theEventIdit previously holds is cancelled ScopedEventIdis noncopyableScopedEventIdis moveable
Updated by Junxiao Shi almost 11 years ago
- Blocks Feature #1999: Strategy for access router added
Updated by Junxiao Shi almost 11 years ago
- Status changed from New to In Progress
Updated by Junxiao Shi almost 11 years ago
- Project changed from ndn-cxx to NFD
- Category changed from Utils to Core
- Target version changed from v0.3 to v0.3
I quickly realize that this Feature is unfeasible in ndn-cxx, because EventId does not reference Scheduler, and Scheduler is not global.
Therefore, I'll implement this in NFD, given that it's only used in NFD strategy.
Updated by Junxiao Shi almost 11 years ago
- Status changed from In Progress to Code review
- % Done changed from 0 to 100
Updated by Alex Afanasyev almost 11 years ago
I could be ok with embedding reference to scheduler within ndn-cxx and then adding ScopedEventId. I'm thinking about just reference, without any guarantee for scheduler lifetime (i.e., if scheduler is destroyed before EventId, this should cause segfault).
Updated by Junxiao Shi almost 11 years ago
I could be ok with embedding reference to scheduler within ndn-cxx and then adding ScopedEventId. I'm thinking about just reference, without any guarantee for scheduler lifetime (i.e., if scheduler is destroyed before EventId, this should cause segfault).
I don't want to do that now because it's not needed.
It could be a separate Feature, after which nfd::scheduler::ScopedEventId could import from.
Updated by Junxiao Shi almost 11 years ago
- Status changed from Code review to Closed