Comments (8)
As you may have noticed, the last lines of m-buffer are:
// NOTE: SET & INIT_SET are deliberately missing. TBC if it the right way.
// NOTE: There is no oplist defined for this container.
In fact, the queue as a synchronization should be a global variable. so I was thinking if it made sense to encapsulate it into another container? But maybe for tuple, it makes sense and I am overthinking :)
from mlib.
I got several threads that share a bunch of structures (to be accessed in a safe way). They are not defined as global variables as I don't like their use (except when it is strictly necessary): I would define a structure (but I would use a tuples as substitute) that is passed by reference to the thread functions. This means that I would require the SET/INIT_SET methods and the possibility to embed buffers inside another containers. Tell me what do you think about such use and if you are going to implement such possibility. Otherwise I can clearly revert on a classic structure.
from mlib.
Ok for implementation.
from mlib.
I worried by the presence of the size parameter in the init method of a buffer. How can it be recursively managed by the init method of the container?
from mlib.
I plan to support only size defined at compilation time (and create a specialized initialize function that takes only the buffer as argument).
from mlib.
The methods INIT & INIT_SET have been done for the buffer, including the BUFFER oplist.
But I still have a constness issue to solve before considering the ticket as closed.
from mlib.
It should work now in 'master'.
from mlib.
Yes, it looks to work. Thank you.
from mlib.
Related Issues (20)
- Compiler errors HOT 3
- README example not work HOT 3
- Add EMPLACE_TYPE support for B+TREE, DICT, RB-TREE, BUFFER, CONCURRENT HOT 3
- bitset: function for getting minimum index with bit set HOT 3
- Memory leak HOT 5
- How to define REALLOC in OPLIST? HOT 1
- Bug in list? HOT 1
- Allocator customization HOT 2
- How to define a set of pointer? HOT 1
- Github actions failure HOT 1
- Possible assertion error HOT 6
- Wrong implementation for set_cstr for bounded strings HOT 16
- M_EMPTY_P(max) doesn't work HOT 4
- BPTREEI_OPLIST2_P4 missing push definition?
- Is it actually possible to create a fixed-size looping buffer? HOT 10
- BUFFER_DEF / BUFFER_THREAD_UNSAFE: performance issue HOT 1
- RB-tree _it_from on root node HOT 1
- Memory issue with _pop_at function while using 2d arrays HOT 1
- string_t: extremely confusing methods names: string_clean and string_clear HOT 5
- Change _str suffix HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mlib.