×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
Stephen,
I haven't tested threadsafety in YAJLINTO. Skimming over the code very
quickly, I don't see anything that wouldn't be threadsafe... but,
without thorough testing, its hard to be certain.
Its also hard to tell whether making it multi-threaded would have any
impact on performance. Your description didn't mention multiple
consumers, so I assume you're looking to reduce the total time of
processing all of your documents. With that in mind, whether
multi-threaded access would be faster or not would depend on your
hardware. So this is really hard to predict.
I did write an article on multi-threaded programming in RPG back in
2012. I think it was published in System iNEWS or iPro Developer. I
don't remember the specifics, and that stuff isn't online anymore.
I believe the ILE RPG Programmer's Guide has a multi-threaded example,
though.
I want to add... multi-threaded programming is complicated and
requires a great deal of expertise. The reason you see so little in
terms of examples is because its very unusual for it to offer any
benefits in a business application. There's very little reason to write
examples. If you want to spend a month studying it, plus an extra month
in debugging your application for threadsafety... you might get
something out of this. But, why would you do that when you can simply
submit multiple jobs?
Really the place where it has added benefit is when you have a single
program that needs to have multiple simultaneous consumers that need to
share resources between them. But, who does that in RPG? Indeed, its
unusual in ANY environment unless you're writing something like a web
server or other network application server.
On 8/20/2020 11:51 AM, Stephen Piland wrote:
Does anyone have a real world example of this? A link or anything?
I'm trying to decode a very large number of element JSON using DATA-INTO and it using YAJLINTO as the %parser. Each file on the IFS is one transaction/message and can have over 3k individual elements. Each message has 2 big blocks of elements split about 50/50. Each half of the message end up writing out to separate group of PFs. Can I process each half simultaneously and not have to submit a ton of separate jobs? Just trying to speed the process.
Any thoughts would be appreciated! Thanks!
As an Amazon Associate we earn from qualifying purchases.