New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
buffer inside another container? #34
Comments
As you may have noticed, the last lines of m-buffer are:
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 :) |
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. |
Ok for implementation. |
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? |
I plan to support only size defined at compilation time (and create a specialized initialize function that takes only the buffer as argument). |
The methods INIT & INIT_SET have been done for the buffer, including the BUFFER oplist. |
It should work now in 'master'. |
Yes, it looks to work. Thank you. |
I've defined a buffer (as queue) of elementary types but it looks I can't use it inside another container (a tuple). Maybe this is related to the fact that I was not able to find a macro like BUFFER_OPLIST to define the respective oplist.
I want to do something like:
The text was updated successfully, but these errors were encountered: