Question: When I scan my whole library, will a metadata agent be invoked sequentially for each, say movie? Or will it be called in parallel with multiple threads for multiple movies so that the call executions will overlap? In my case I need it to be sequential, but I don’t think that’s the case…?
Edit: I know you can specify @parallelize to run parts of the code in parallel, but I mean the actual search and/or update methods.
The scan and matching is sequential. The media analysis runs in parallel with the metadata retrieval. I believe that two agent updates run at once, but I might be wrong.
Out of curiosity, why would you need it to be sequential?
Elan, thanks for the reply - it matches what I've seen so I'm guessing you're right. I'm using an API (AniDB) that requires me to use at most one connection and one call at the same time, so I cannot have multiple connections and/or multiple calls over the same connection. Hence, I need to create a thread lock to avoid troubles. From what you're saying then this only applies to the updates, not the search call. It would be nice if this sort of thing could be documented somewhere in the agent API docs.
Ah, very interesting, that makes sense. Since it is multiple threads in the agent, you’re right, I think you could use an mutex around usage of the API. Let us know if you need anything else!
No, that's fine, as long as I know how the agents are called I can handle it. Thanks again.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.