On 2023-06-19 16:20, Andrew Tropin wrote:
> * module/ice-9/atomic.scm (atomic-box-update!): New variable.
> ---
> I was implementing some concurrent code and started to use (ice-9
> atomic), when found out that there is no procedure for updating the
> value of the atom using another function.
>
>
On 2023-06-22 17:42, Philip McGrath wrote:
> On Thu, Jun 22, 2023, at 5:02 AM, Andrew Tropin wrote:
>> On 2023-06-22 01:21, Philip McGrath wrote:
>>>
>>> In any case, the current documentation for
>>> atomic-box-compare-and-swap! is clear that the comparison is eq?: it
>>> just means that, when th
On Thu, Jun 22, 2023, at 5:02 AM, Andrew Tropin wrote:
> On 2023-06-22 01:21, Philip McGrath wrote:
>>
>> In any case, the current documentation for
>> atomic-box-compare-and-swap! is clear that the comparison is eq?: it
>> just means that, when the behavior of eq? is unreliable, so is the
>> behav
On 2023-06-22 01:21, Philip McGrath wrote:
> On Wed, Jun 21, 2023, at 11:59 PM, Andrew Tropin wrote:
>> On 2023-06-21 18:54, Jean Abou Samra wrote:
>>
Le 21 juin 2023 à 18:46, Andrew Tropin a écrit :
Make sense, but it's hard for me to say something valuable on this
topic. U
On Wed, Jun 21, 2023, at 11:59 PM, Andrew Tropin wrote:
> On 2023-06-21 18:54, Jean Abou Samra wrote:
>
>>> Le 21 juin 2023 à 18:46, Andrew Tropin a écrit :
>>>
>>> Make sense, but it's hard for me to say something valuable on this
>>> topic. Usually, I don't use eq? and don't have enough knowle
On 2023-06-21 18:54, Jean Abou Samra wrote:
>> Le 21 juin 2023 à 18:46, Andrew Tropin a écrit :
>>
>> Make sense, but it's hard for me to say something valuable on this
>> topic. Usually, I don't use eq? and don't have enough knowledge of its
>> internals.
>
>
> *Currently*, it just checks whet
> Le 21 juin 2023 à 18:46, Andrew Tropin a écrit :
>
> Make sense, but it's hard for me to say something valuable on this
> topic. Usually, I don't use eq? and don't have enough knowledge of its
> internals.
*Currently*, it just checks whether the two C-level SCM values are the same
bitwis
On 2023-06-21 11:06, Jean Abou Samra wrote:
> Le mercredi 21 juin 2023 à 11:06 +0200, Jean Abou Samra a écrit :
>> Le lundi 19 juin 2023 à 16:20 +0400, Andrew Tropin a écrit :
>> > + (if (eq? old-value (atomic-box-compare-and-swap! box old-value
>> > new-value))
>>
>>
>> Are you sure eq? i
Le mercredi 21 juin 2023 à 11:06 +0200, Jean Abou Samra a écrit :
> Le lundi 19 juin 2023 à 16:20 +0400, Andrew Tropin a écrit :
> > + (if (eq? old-value (atomic-box-compare-and-swap! box old-value
> > new-value))
>
>
> Are you sure eq? is a good idea here? (eq? 5 5) is unspecified, for exa
Le lundi 19 juin 2023 à 16:20 +0400, Andrew Tropin a écrit :
> + (if (eq? old-value (atomic-box-compare-and-swap! box old-value
> new-value))
Are you sure eq? is a good idea here? (eq? 5 5) is unspecified, for example.
Perhaps eqv? would be more appropriate.
signature.asc
Description: Th
* module/ice-9/atomic.scm (atomic-box-update!): New variable.
---
I was implementing some concurrent code and started to use (ice-9
atomic), when found out that there is no procedure for updating the
value of the atom using another function.
IMHO, atomic-box-update! fits well FP paradigm (which i
11 matches
Mail list logo