Skip to content

Concurrency problem #10

Description

@joaofernandes

Hi, I'm currently trying to re-use the angular-worker and I already managed to only execute the Run function once the angularWorker is finally available, the problem is, when multiple executions run concurrently, the response from the worker get mixed up. I'm currently only returning a $http request from the worker

return $http({ method: input.method, url: input.url, data: input.data, headers: input.headers, config: input.config }).then(function (result) { output.resolve(JSON.parse(JSON.stringify(result))); }, function (fail) { return output.reject(fail); });

When running the same code but always creating a new worker, it works like a charm since there is no possible way to 1 request get mixed up with another worker job.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions