ethand91 / mediasoup-ios-client

Mediasoup 3 iOS Client
ISC License
131 stars 65 forks source link

Created a lot of threads #34

Open LucasDang opened 4 years ago

LucasDang commented 4 years ago

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.

ethand91 commented 4 years ago

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

LucasDang commented 4 years ago

Sure. So did you encounter this problem?

ethand91 commented 4 years ago

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

LucasDang commented 4 years ago

Thank you very much!

okwasi commented 4 years ago

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?

ethand91 commented 4 years ago

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

okwasi commented 4 years ago

@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?

ethand91 commented 4 years ago

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

okwasi commented 4 years ago

@ethand91 ok thanks.

cavoixanh commented 3 years ago

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.