Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > pl.comp.os.linux.programowanie > #2250
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | heby <heby@poczta.onet.pl> |
| Newsgroups | pl.comp.os.linux.programowanie |
| Subject | Re: ::read i ::poll |
| Date | Thu, 5 Nov 2020 12:57:04 +0100 |
| Organization | A noiseless patient Spider |
| Lines | 23 |
| Message-ID | <ro0pai$b5d$1@dont-email.me> (permalink) |
| References | <rntsee$3b1$1@dont-email.me> <20201105104532.zdht7h4fy4vutyah@marchewa.redembedded.pl> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 8bit |
| Injection-Date | Thu, 5 Nov 2020 11:57:06 -0000 (UTC) |
| Injection-Info | reader02.eternal-september.org; posting-host="ead3770d27c28f2726beb2f50b568996"; logging-data="11437"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19PaWMrz4yvuPmbT61gdZOC" |
| User-Agent | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 |
| Cancel-Lock | sha1:T90RhSKG2g5pQf4CbQLH1Ll0OvQ= |
| In-Reply-To | <20201105104532.zdht7h4fy4vutyah@marchewa.redembedded.pl> |
| Content-Language | en-US |
| Xref | csiph.com pl.comp.os.linux.programowanie:2250 |
Show key headers only | View raw
On 05/11/2020 11:45, michal.lyszczek@bofc.pl wrote:
> Najprościej będzie wysłać sygnał do konkretnego wątku przy pomocy
> pthread_kill(3).
Co z taką sytuacją:
{
...
std::mutex::scoped_lock lock(mutex);
...
::read(...)
}
Zakładając że zainstaluje globalny handler sygnałów (co już jest błędem
projektowym, może nie tylko ten wątek go potrzebuje), czy mogę wsyłać
coś co spowoduje że ::read wyskoczy z EINTR?
> Jak kod ma być przenośny między unixami, należy
> pamiętać by wyłączyć SA_RESTART na systemach z rodziny BSD przy
> pomocy siginterrupt(3).
No i tu właśnie jest problem. To ogromna apliakcja. Z powodu kilku
::read mam manipulować krytyczm, globlanym stanem aplikacji? Brzmi jak 1
z kolokwium z inżynierii programowania.
Back to pl.comp.os.linux.programowanie | Previous | Next — Previous in thread | Next in thread | Find similar
::read i ::poll heby <heby@poczta.onet.pl> - 2020-11-04 10:31 +0100
Re: ::read i ::poll michal.lyszczek@bofc.pl - 2020-11-05 11:45 +0100
Re: ::read i ::poll heby <heby@poczta.onet.pl> - 2020-11-05 12:57 +0100
Re: ::read i ::poll michal.lyszczek@bofc.pl - 2020-11-05 13:43 +0100
Re: ::read i ::poll heby <heby@poczta.onet.pl> - 2020-11-05 15:26 +0100
Re: ::read i ::poll michal.lyszczek@bofc.pl - 2020-11-05 16:01 +0100
Re: ::read i ::poll heby <heby@poczta.onet.pl> - 2020-11-05 19:16 +0100
csiph-web