openframeworks / openframeworks/openFrameworks

ofThreadChannel : reset and size

Open
#4,809 18 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
10.4k
Forks
2.6k
Avg merge
1d 21h
Merged PRs (30d)
9

Description

Hey!

It would be great if there's an option to reset an ofThreadChannel i.e. set closed = false

this would be used in cases where you are dynamically joining and setting up local threads
and you need to do the same with your thread channels

since ofThreadChannel doesn't support = assignment, and can't be reset, this means we have to store it in a pointer and recreate it each time

also. is there any reason why .close() isn't called from the destructor?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the ofThreadChannel implementation and its existing close behavior. Review the comment thread to clarify the requested reset and size behavior, along with whether destruction should close the channel; done means the agreed behavior is implemented and covered by appropriate tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.