gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet-scheme] 02/03: dht/client: Eliminate the hash table from the <se


From: gnunet
Subject: [gnunet-scheme] 02/03: dht/client: Eliminate the hash table from the <server> record.
Date: Mon, 14 Feb 2022 22:22:38 +0100

This is an automated email from the git hooks/post-receive script.

maxime-devos pushed a commit to branch master
in repository gnunet-scheme.

commit 5e9817967664c197ab47543009d331ef0841a2bb
Author: Maxime Devos <maximedevos@telenet.be>
AuthorDate: Mon Feb 14 21:07:52 2022 +0000

    dht/client: Eliminate the hash table from the <server> record.
    
    The idea is to let 'reconnect' be the only procedure that has access
    to the (thread-unsafe!) hash table, simplifying concurrency analysis.
    
    * gnu/gnunet/dht/client.scm (<server>)[id->operation-map]: Remove
      field.
      (connect): Adjust call to %make-server for removed field.
---
 gnu/gnunet/dht/client.scm | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/gnu/gnunet/dht/client.scm b/gnu/gnunet/dht/client.scm
index e6ec21a..395c5ae 100644
--- a/gnu/gnunet/dht/client.scm
+++ b/gnu/gnunet/dht/client.scm
@@ -579,10 +579,7 @@ currently unsupported."
       (fields (immutable terminal-condition server-terminal-condition)
              (immutable control-channel server-control-channel)
              ;; Atomic box holding an unsigned 64-bit integer.
-             (immutable next-unique-id/box server-next-unique-id/box)
-             ;; Hash table from operation ids to their corresponding
-             ;; <get> object.  TODO: hash maps are thread-unsafe
-             (immutable id->operation-map server-id->operation-map)))
+             (immutable next-unique-id/box server-next-unique-id/box)))
 
     (define (maybe-send-control-message!* terminal-condition control-channel
                                          . message)
@@ -744,9 +741,9 @@ code automatically tries to reconnect, so @var{connected} 
can be called after
                 #:spawn spawn)
       (%make-server terminal-condition control-channel
                    ;; Any ‘small’ exact natural number will do.
-                   (make-atomic-box 0)
-                   id->operation-map))
+                   (make-atomic-box 0)))
 
+    ;; TODO(id->operation-map): Hash tables are thread-unsafe.
     (define* (reconnect terminal-condition config
                        id->operation-map control-channel
                        #:key (spawn spawn-fiber)

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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