Hi there,
> Are you talking about sockets or about pcbs? Because there should be no
> problems using different sockets from different threads. You do have the
> "only one thread in core lwIP" rule, so performance is not great on
> multi-core systems in that case. That's the downside of staying
> "lightweight" so far (the "lw" in lwIP).
Thanks for your reply.
Yes, I use different sockets from different threads. But when I use one socket from different threads.
The big lock in lwip stack impacts the system's overall performance, I was wondering if I should use per-socket (or pcb) lock,
and I practise it based on current lwip stack arch and get dead-lock. This may need lwip stack native support, I think.
Does the lwip stack have plans to support per-socket(or pcb) lock feature in the future?
> I don't think there has been public work in this area, so you're welcome
> to provide anything if you come up with something. I could imagine
> reader/writer locks, reference counting and many more. But up to now,
> noone really had enough interest in this area to actually implement
> this. I don't think it's a simple task to get that right!
Perhaps implementing per-socket lock is not a bad idea.