mediasoup-ios-client icon indicating copy to clipboard operation
mediasoup-ios-client copied to clipboard

Created a lot of threads

Open LucasDang opened this issue 4 years ago • 10 comments

When I use it, I find that a lot of threads are created. Have you ever encountered? After about 5 calls, the thread created about 100.

LucasDang avatar May 29 '20 09:05 LucasDang

After the calls did you close the Producers/Consumers/Transports?

ethand91 avatar Jun 01 '20 10:06 ethand91

Sure. So did you encounter this problem?

LucasDang avatar Jun 01 '20 10:06 LucasDang

Reproduced the issue, try and reduce the number of threads used.

ethand91 avatar Jun 03 '20 04:06 ethand91

Thank you very much!

LucasDang avatar Jun 04 '20 03:06 LucasDang

Reproduced the issue, try and reduce the number of threads used.

Hi @ethand91. I am also seeing this issue. Could you please elaborate on what you mean here by reducing the number of threads used? Is there a way to do that in your library?

okwasi avatar Jul 13 '20 02:07 okwasi

@okwasi The number of threads may be reduced by creating one shared thread and having the library use that thread. Could affect performance though..

ethand91 avatar Jul 13 '20 09:07 ethand91

@okwasi The number of threads may be reduced by creating one shared thread and having the library use that thread. Could affect performance though..

@ethand91 ok thanks. I'm struggling to understand how to do this though. How do I go about creating a shared thread and giving that to the library? I assume you mean I need to create a common dispatch queue and somehow feed that to the library? How do I do that?

okwasi avatar Jul 13 '20 16:07 okwasi

@okwasi Sorry I meant this will need to be implemented on the library side.

ethand91 avatar Jul 14 '20 01:07 ethand91

@ethand91 ok thanks.

okwasi avatar Jul 16 '20 07:07 okwasi

Hi @ethand91

Sorry, I have a question. When can the library be implemented ? After 2 calls, my thread is also about 100 threads and I got bug: hang local video. Please help If root cause is : there are many threads?

@okwasi , @LucasDang : Was your issue fixed in your side?

Thank you very much.

cavoixanh avatar Jan 25 '21 09:01 cavoixanh