Skip to content

Commit

Permalink
Updated todo.
Browse files Browse the repository at this point in the history
  • Loading branch information
FedeDP committed Jan 26, 2019
1 parent c3ffc39 commit d337a5a
Showing 1 changed file with 1 addition and 56 deletions.
57 changes: 1 addition & 56 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -1,61 +1,6 @@
## 4.0.0

### Module_ref

- [x] module_ref returns a new self_t* with a "bool is_ref=true"; then we only need to check that is_ref is false.
module_ref should then return a new self_t* object, add it to a stack in module.
- [x] A module should clean all its reference when leaving (destroying stack)
- [x] All API should go through self_t, eg: self_t *recipient = module_ref("foo"); module_tell(self, recipient, ...);

- [x] All API should avoid using an another-mod-ref as self

- [x] self_t to have a self_t *owner; if it is NULL it is not a reference; otherwise it is. Only module that referenced can unreference.
- [x] Should we pass an unique reference in pubsub messages for each recipient? Or only one for all?

-> this leads to better performance too (no more hashmap lookups for module_tell)

- [x] Better arrange code in module.c (ie: above internal API, below exposed API)
- [x] Split module.c into module_pubsub.c and module_generic.c (?)
- [x] Add a module_priv.c with various common (priv) functions?
- [x] Better macros naming (eg: GET_MOD_PURE etc etc...)

- [x] Add new tests for module_ref!
- [x] Update libmodule API doc
- [x] State in doc when you can use a module ref for normal functions (eg: module_is)

- [x] Each module's self should be a static (non-pointer) variable (to avoid user freeing it)?

### Generic
- [x] Use attribute pure where needed
- [x] Use attribute format where needed
- [x] Use calloc where needed
- [x] Module register should avoid memleaks when it fails with NOMEM.
- [x] Added modules_ctx_loop test
- [x] Added module pubsub recv test

### Stack API
- [x] Add _clear function
- [x] Add tests!
- [x] Update doc!
- [x] Offer a stack_set_dtor() API to offer a callback to free each item when autofree is true

### Map API
- [x] Add _clear function
- [x] Add tests!
- [x] Fix issue in map_new if m->data calloc fails: map object was not memsetted to 0; it would lead to a crash when map_free was called
- [x] Update doc!
- [x] Offer a map_set_dtor() to offer a callback to free each item when autofree is true

### Fix
- [x] Actually honor current module's callback when flushing pubsub messages

### Examples
- [x] Update examples!

### Release 4.0 (api break)!

## 4.1.0
- [ ] PoisonPill message to automatically stop another module?
- [ ] In stack_clear and map_clear, avoid unsetting dtor

## Ideas
- [ ] Let contexts talk together? Eg: broadcast(msg, bool global) to send a message to all modules in every context; module_publish message in another context? etc etc
Expand Down

0 comments on commit d337a5a

Please sign in to comment.