Re: Implementing a cancelable task

Christian Grothoff <[email protected]> Fri, 24 Jul 2020 21:26:49 +0200
Newsgroups gmane.network.gnunet.general
Message-ID <[email protected]>
On 7/24/20 4:45 PM, Alessio Vanni wrote:
> 
> The problem I'm facing is that due to the presence of CADET, I don't
> have an immediate way to associate a certain task with a certain reply,
> as CADET is another async operation.
> 
> If really the only way (or the more correct) is to have the ID in the
> message sent to the remote peer then I supposed I'll do it, but I
> thought I'd first ask people with more expertise, especially since I'd
> like to have it work similarily to what GNUnet offers in its services'
> APIs (e.g. `GNUNET_GNS_lookup_cancel'.)

I'm still not exactly sure what you are doing, but indeed putting an ID
into the request and the reply is a very common pattern that is almost
never wrong ;-).
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEE2EI7yzJseQcDOSnHk55r4eKfw8wFAl8bNfkACgkQk55r4eKf
w8wtKxAAk1pkLHshrmttMn77YUUVcAkMWRen4+cDF4vqzx+wYPv7FdQtcYPUR7yW
NCGoWNeeTAw33AsGAlU/gobcqWJeIqAf+gtSp7VAktOzMZ0S7cnsoHogD/35B7tA
uuVmx9SC2o1OfQTiGQUbnQW71qJ1v7oKw/Kf4zbGkHmMW7lHyCIXakAoN2pV5W7k
O6ikVG2RLxrsZyG+afmNYialmOixBNaA8Vd4ZcrrsZxGPU5EF/AfkXvwasa+P027
Z8G9kSl5Hon0+l5ebwcFDA945hp7t3JADusjzdbUH/GzgNBUuvd7JNbMf5+BllHm
lfSdayFA+/GqKyz6hjftCupMy22s9rakV3mMpnKPD8zGiXJjc1G5dUT8e8PU5Hjn
EoI5H1il7H/0Q8z/nHj9g2bpslskipXPzqdV+QFjGHapv9rJxKj3Wa7NS6IPSF+y
uKbA8IeC/tRDc1wrPVw9TxWt8u+OQP5xD6INGwPFMJxGarfjoDZLALuSd8UF62sn
JFZppMn+CnwI0fCmXO+OJwjDBc+Js9AAAtyJSrEJX03nAV8t8+KmMWRCeDrpWkTD
BktVea389eO0zC6v0MIB9OdID1ViZrZLW/j5sKWPlc4FImvXKpmOgBi4SBBeoE9n
F0BKH9vdr7NeFv6qU7stV28BCn7hsuEhiCE/9GHPcDtZCa8dJnk=
=ci0o
-----END PGP SIGNATURE-----