• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • CPACK
    • Home
    • List packs
    • Submit pack
  • Repository
    • Load local file
    • Load from HTTP
    • Load from library
    • Remove triples
    • Clear repository
  • Query
    • YASGUI SPARQL Editor
    • Simple Form
    • SWISH Prolog shell
  • Help
    • Documentation
    • Tutorial
    • Roadmap
    • HTTP Services
  • Login

1 About the SWI-Prolog Redis client
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
    • Packages
      • Redis -- a SWI-Prolog client for redis
        • About the SWI-Prolog Redis client
          • Redis and threads
          • Redis TLS support
          • Using Redis sentinels
          • About versions
          • Redis as a message brokering system
          • History

1.1 Redis and threads

The connection between the redis client and server uses a stream pair. Although SWI-Prolog stream I/O is thread-safe, having multiple threads using this same connection will mixup writes and their replies.

At the moment, the following locking is in place.

  • Connections created using redis_connect/3 are not locked. This implies the connection handle may be used from a single thread only, or redis/3 requests must be protected using with_mutex/2.
  • Redis/3 request using a server name established using redis_server/3 are locked using a mutex with the same name as the server name.

ClioPatria (version V3.1.1-51-ga0b30a5)