Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java - Multithreading #295

Open
Khanattila opened this issue Mar 13, 2016 · 1 comment
Open

Java - Multithreading #295

Khanattila opened this issue Mar 13, 2016 · 1 comment

Comments

@Khanattila
Copy link

An example in pseudocode.

List<SteamId> steamUsers;
List<SteamGame> steamGames;

steamUsers.stream().forEach((user) -> {
            try {
                steamGames.addAll(user.getGames().values());
            } catch (SteamCondenserException ex) {
                Logger.getLogger(...).log(...);
            }
});

You can not make it multithreaded? I tried different solutions but does not work.

Caused by: com.github.koraktor.steamcondenser.exceptions.SteamCondenserException: XML data could not be parsed: FWK005 parse may not be called while parsing.

@koraktor
Copy link
Owner

Steam Condenser’s Java implementation uses a static DocumentBuilder instance which is reused for all XML parsing. That prevents it from being capable of multi-threading.

Initially, XMLData should be removed in version 2.0.0 as Valve deprecated its XML APIs. As there‘s still no full-featured Web API, this might change, though. So I might consider this.

However, the master branch already uses the Web API for most parts, e.g. SteamId#getGames(). So you might have more luck with that branch.

@koraktor koraktor removed their assignment Feb 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants