ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

YAJL library

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • YAJL library

    Hi,

    Is the YAJL/YAJLR4 threadSafe?
    Because I have an RPG program with 2 thread. but If in both thread I run the yajl functions sometimes goes in errors with strange conditions...


    I saw than this service program is compiled to run at V6R1, Could I compile it to V7R3?


    Many thanks.

    Bye

  • #2
    YAJLR4 is not threadsafe.

    YAJL, itself, may be? I don't really know as I've never looked into it.

    It is extremely unusual to hear of someone writing an RPG program using multiple threads. In fact, aside from my own code (that I wrote as a test, and never put into production) this is the only time I've ever heard someone even bring up the topic.

    Comment


    • #3
      HI Scott,

      I wrote more than once rpg program that use multithread, specially for socket use, normally I made one thread for the receiver side, and another for sender side, and I take a lot of example from your articles and from your post.

      In this case I'd like to use the YAJL in both thread, really in the receiver thread of my program I need the data-Into to parse the JSON input data received from the client, and in the Sender thread I wrote the Json answer, but for debug mode I want to return to the client a JSon composed with the input received and the data retrived from some table in the IBM I, now I suspended this debug mode and it works without problem.

      Many thanks at all.

      Comment

      Working...
      X