anchao commented on PR #17468:
URL: https://github.com/apache/nuttx/pull/17468#issuecomment-3832765616

   > > I won't let this submission be merged:
   > > 
   > > 1. code size will increase.
   > > 2. performance will degrade.
   > 
   > without refcount, the used after free will happen under the stress testing 
of task/thread create/destroy. Used after free is a critical bug which must be 
fixed. refcount is one of well known method to fix this type of error, if you 
have better suggestion/method, please point out.
   
   1. This is because in your business logic, Task A still holds the resources 
of Task B when it exits. Why can't the resources be released properly?
   2. Most IoT and wearable devices use a fixed thread pool. If your business 
process involves the frequent creation and destruction of a large number of 
threads, why not design them as deterministic tasks and implement the creation 
and exit logic with wait/notify mechanisms?
   3. The only acceptable solution to me is to make this feature configurable 
via Kconfig – no other options are on the table.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to