lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] Multi-threaded socket access once again


From: Steffen Wolfer
Subject: Re: [lwip-users] Multi-threaded socket access once again
Date: Fri, 18 Jul 2014 16:41:35 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

Hi Fabian,

thanks for your reply. The submitting threads should always be stopped
before the application closes the socket. The receiver thread does all
the socket management, like open, close, bind, accept etc. and also
controls the other submitting threads. But I'm not sure what happens if
the remote site closes the connection unexpectedly, so I'll have to
check that.

Regards,
Steffen

Am 18.07.2014 14:55, schrieb Fabian Koch:
> Hey Steffen,
> 
> <insert the usual "not supported answer" here first>
> 
> Having said that, it seems like an okay setup if there are no other 
> unexpected accesses.
> For example if another task closes the socket while your receive task is in 
> the select() you'll also be in trouble.
> For our adaptation we modified LwIP to silently exit the select() call if 
> that happens but in the official release, is runs into assertions.
> 
> The whole ordeal of "access sockets from multiple tasks" is a big topic in my 
> opinion and not something that LwIP can hide from.
> I know the construct of the single op_completed semaphore and the mboxes is 
> one of the main problems behind not being able to support multiple tasks, but 
> the argument of no longer being light-weight is not true if we make all the 
> necessary changes optional and flexible.
> 
> Cheers,
> Fabian
> 
> _______________________________________________
> lwip-users mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/lwip-users
> 
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]