Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #25472 > unrolled thread

Re: boolean and thread safety

Started byLew <noone@lewscanon.com>
First post2011-02-11 17:49 -0500
Last post2011-02-12 00:04 +0100
Articles 2 — 2 participants

Back to article view | Back to comp.lang.java.programmer

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: boolean and thread safety Lew <noone@lewscanon.com> - 2011-02-11 17:49 -0500
    Re: boolean and thread safety Daniele Futtorovic <da.futt.news@laposte.net.invalid> - 2011-02-12 00:04 +0100

#25472 — Re: boolean and thread safety

FromLew <noone@lewscanon.com>
Date2011-02-11 17:49 -0500
SubjectRe: boolean and thread safety
Message-ID<ij4ebn$4k3$2@news.albasani.net>
raphfrk@gmail.com wrote:
> does this in effect auto-sync, since you can't partially read a byte
> and even if you could it is a boolean anyway?

Why do you think anything about the 'byte' type is relevant here?  You're 
discussing 'boolean', a very different type.

-- 
Lew
Ceci n'est pas une fenĂȘtre.
.___________.
|###] | [###|
|##/  | *\##|
|#/ * |   \#|
|#----|----#|
||    |  * ||
|o *  |    o|
|_____|_____|
|===========|

[toc] | [next] | [standalone]


#25908

FromDaniele Futtorovic <da.futt.news@laposte.net.invalid>
Date2011-02-12 00:04 +0100
Message-ID<ij4fah$fqg$1@news.eternal-september.org>
In reply to#25472
On 11/02/2011 23:49, Lew allegedly wrote:
> raphfrk@gmail.com wrote:
>> does this in effect auto-sync, since you can't partially read a byte
>> and even if you could it is a boolean anyway?
>
> Why do you think anything about the 'byte' type is relevant here? You're
> discussing 'boolean', a very different type.

I assume what he was thinking about was that thread A might be reading 
the value while thread B would write it. In that sense, if the smallest 
thing that could be read/addressed were a byte, no interruption could occur.
Hence my talking about assignments, and that the matter of 
synchronisation isn't primarily about interlacing read/writes, but 
rather about whither to the write and whence from the read take place.

-- 
DF.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.programmer


csiph-web