Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
86 views

In previous topic I've found out that my task is a good candidate for FJP/Executors.newWorkStealingPool() Let me remind the code base(it is artificial code which demonstrated my real problem): fun ...
gstackoverflow's user avatar
1 vote
1 answer
67 views

I'm having problems chaining mergeMap to retrieve related objects. First, I get a listing of users userService.loadUsers$().pipe( mergeMap((users: User[]) => forkJoin(users.map((user: IUser) =>...
IMOsiris's user avatar
  • 155
0 votes
0 answers
63 views

I have got an interview question. We have 3 threads and only one thread should kill and other threads should complete using fork_join, join_any, join_none. How do you do that? Generally using ...
yenupuri Ramarao's user avatar
0 votes
2 answers
98 views

So,I'm in kind of fix here. I've got 2 GET APIs. I need to do something once those APIs return success. I did the following. let sub1$ = this.myService.callFirstApi(); let sub2$ = this.myService....
Snk's user avatar
  • 149
1 vote
1 answer
64 views

I have a problem using forkjoin. I have three Angular services that take care of making an http call. In each of these services there is an Observable, when the htttp request receives a response, the ...
Niccolò Boddi's user avatar
0 votes
3 answers
83 views

I've read about forkJoin, async, await, and also tried out angular life cycle methods, but finally found no good solution. I need to wait until initiAttributesMap has finished his job before next code ...
saab's user avatar
  • 139
0 votes
1 answer
94 views

I've been trying to do a quick sort using ForkJoin in Java and while in works for the most part, I get a stackoverflow when each element of the array is equal. import java.util.Comparator; import java....
Kirill Tesla's user avatar
1 vote
2 answers
373 views

I'm testing some feature of Spring state machine (version 4.0.0). When I come across fork/join feature, the behavior of JOIN is somewhat strange to me (FORK is working as I expected). Any explanation ...
Wazi Armstrong's user avatar
2 votes
1 answer
95 views

I want to pass some data from one module to another module. For that I am using Subject. I have created below subject : import { Injectable } from '@angular/core'; import { Subject } from 'rxjs'; @...
rk01's user avatar
  • 27
2 votes
2 answers
553 views

I'm experimenting with SystemVerilog threads, and I wrote the following example that works fine. The goal is simply to spawn 2 tasks that print a number and wait for both of them using "wait fork&...
darionvgvp's user avatar
1 vote
1 answer
109 views

Please notice the semicolon after #10 delay in the second case. I thought I understood fork-join, but after these outputs, I don't think I do. Can someone please explain why the semicolon is causing ...
lehar's user avatar
  • 11
-1 votes
1 answer
64 views

I have a simple test program. It sums the values in an array of 10m entries using a sequential approach and a parallel approach. Running on a chromebook, with 12 cores. import java.util.Random; import ...
Mark Eccles's user avatar
0 votes
1 answer
88 views

I have a single threaded code as follows : private Map<Employee, EmployeeDeptMap> empToEmpDept(List<Employee> empList) { Map<Employee, EmployeeDeptMap> map = new HashMap<>()...
Scientist's user avatar
  • 1,474
0 votes
1 answer
45 views

We have five different tables, but the user exists only in one of them, we don't know which one it is, which operator is best to use to query all of them at the same time? I'm using forkJoin([...
Sakén's user avatar
  • 314
1 vote
2 answers
229 views

I have a piece of code that looks like this getInformations().subscribe( informations => { let subs = []; for (const information of informations) { subs.push(...
Vivek Shukla's user avatar
0 votes
0 answers
69 views

I`m using simple forkJoin() like this: const sources = [this.btApiClient.getAll(), this.buApiClient.getAll()]; forkJoin(sources) .pipe( map(([buildTypes, businessUnits]) => { this....
Jackie's user avatar
  • 336
0 votes
0 answers
241 views

We have a scenario to insert ~4M records into database. We receive these records in batches of 56 files, each containing ~80k records. Used Forkjoinpool to insert the records in batches of 1000. Once ...
Karthik A.K's user avatar
-1 votes
2 answers
78 views

I have a problem, how to combine 2 observable in a complicated case. I show you the code as follow: so I have 2 Observables: This 2 Observable will be used in canActivate(): Observable<boolean| ...
user1938143's user avatar
  • 1,204
-1 votes
1 answer
282 views

I'm trying to pass api calls inside the forkJoin or combineLatest then pipe them and finally map the results one by one to asign them values to the class level variables. All the api calls return an ...
Alex Rodriguez's user avatar
1 vote
2 answers
1k views

On my ngOnInit() I have this code: combineLatest([ obs1, obs2, obs3]).subscribe(([obs1Res, Obs2Res, Obs3Res]) => { }) and the result is emitted once when they are completed. Is there a way to emit ...
N. St's user avatar
  • 15
0 votes
1 answer
510 views

I am trying to call multiple APIs using forkJoin. I believe the order in which the results will be return can be random. Is it possible to know which result belongs to which request? Existing code: ...
developer's user avatar
  • 1,621
1 vote
1 answer
53 views

I'm trying to play with ForkJoinFramework. I know that my code might not be a good use case to use ForkJoin, but it should work at least.. I'm using RecursiveAction to concurrently modify a static ...
Kyle Yuan's user avatar
0 votes
2 answers
258 views

I wrote a program that searches for the necessary files in a directory and its subfolders based on the desired file size. But according to the assignment, I need to add a multithreaded "Fork-join&...
VasiaJava's user avatar
4 votes
1 answer
444 views

There are two parallel processes. Each process has two steps. The second step of the first process is always executed after the first step. The second step of the second process is performed only ...
user6580165's user avatar
0 votes
0 answers
179 views

I've seen all the example of using forkJoin with get requests, but all of them use the get directly in the forkJoin. Is it possible to pass in the data service function into the forkJoin? Currently, ...
CStreet's user avatar
  • 403
5 votes
1 answer
975 views

Is it possible to use RecursiveAction, for example, in conjunction with -- instead of the fork/join pool -- a pool of virtual threads (before I attempt a poorly-designed, custom effort)?
HellishHeat's user avatar
  • 2,537
0 votes
1 answer
697 views

How would we describe the following graph like the example (with fork and join)? In the example below why does the "count" start with 3?
Zartilas's user avatar
2 votes
1 answer
721 views

Scenario : On ngOnInit, I need to call 3 APIs, Fork-Join them and save data in an array. 1st API is independent. 2nd is also independent but the 3rd one depends on response of the 2nd API. I have not ...
MenimE's user avatar
  • 320
0 votes
1 answer
322 views

LogDataTransferService: @Injectable({ providedIn: 'root' }) export class LogDataTransferService { private logs = new Subject<SampleLogModel[]>(); public logs$ = this.logs.asObservable(); ...
Narek Keshishyan's user avatar
-1 votes
1 answer
703 views

I am building a resolver that is used when my app loads initially. I need to run several HTTP requests, which can be run at the same time (hence using forkJoin). But there are a few that need to be ...
ts1993's user avatar
  • 109
0 votes
0 answers
200 views

I'm trying to make a program that creates 10 child processes by using fork(). By reading sem_overview I know that if fork(): returns 0 -> child process return -1 -> error return something >...
motijon963's user avatar
2 votes
1 answer
527 views

I am setting up a Spring Boot application (DAO pattern with @Repositories) where I am attempting to write a @Service to asynchronously pull data from a database in multiple threads and merge-process ...
t.ry's user avatar
  • 97
0 votes
1 answer
162 views

I am writing a command-line application in Java 8. There's a part that involves some computation, and I believe it could benefit from running in parallel using multiple threads. However, I have not ...
Leszek Pachura's user avatar
1 vote
1 answer
2k views

I have dynamic array of []Observables, and I need to call them before finalize() API will be called, because then it will automatically lock the whole Object in DB for any modifications. Issue is that ...
strakz's user avatar
  • 101
0 votes
1 answer
1k views

I have array of requests like: let array = [req1,req2,req3.....,req(n)] Currently I am using forkJoin to call a subscriber only after getting all requests response. Now I want to modify my code to ...
Vaibhav Shah's user avatar
0 votes
1 answer
905 views

I'm learning about forkJoin. I'm trying to wrap my head around how it works compared to creating an observable with of. Please tell me if I have this right: When I use of, it creates an observable ...
gib65's user avatar
  • 2,039
2 votes
2 answers
1k views

So, I have a service that has three functions that I need to execute. I use forkJoin because I want to take further action when a response has been received for all! One of them needs to receive one ...
Domagoj Hamzic's user avatar
1 vote
1 answer
777 views

After receiving the initial request response, I need to perform three parallel requests in my ngrx Effect. I implemented the following, however when I inspect it using the network tab, all three ...
Thushara's user avatar
  • 246
0 votes
0 answers
135 views

I'm using a ForkJoin to wait on 3 objects. Calling their getters inside the fork join seems not to work, giving the error seen below. The same method is called multiple times throughout the project, ...
Michiel Saey's user avatar
0 votes
0 answers
73 views

From Javadoc for ForkJoinTask::fork method: Arranges to asynchronously execute this task in the pool the current task is running in.... So when we invoke fork method on a ForkJoinTask, does it start ...
Mandroid's user avatar
  • 7,778
0 votes
1 answer
730 views

First Http call to fetch Shipment Data IF shipment data is NOT AVAILABLE exceution will be stop with showing error IF shipment data is AVAILABLE i need to call second and third calls paralalley I used ...
Thushara's user avatar
  • 246
2 votes
2 answers
4k views

I have two independent api calls. Below is the code for two api calls: public getLendingType(partyId: string): Observable<{ lendingType: string, partyId: string }> { return this....
Fazla Elahi Md Jubayer's user avatar
6 votes
1 answer
18k views

I have checked my project that forkjoin is being deprecated, since forkjoin is deprecated from angular what is the best option to use instead?
Hayat's user avatar
  • 91
0 votes
1 answer
497 views

this.hobbies :any[]=[]; this.worklist : any[]=[]; forkJoin(this.personService.addHobbies(this.hobbies),this.professionService.updateWorks(this.worklist)) .subscribe(res => {}); here i'm ...
AnkiR2005's user avatar
1 vote
1 answer
1k views

This my permission service. I wanna get a boolean array. import { forkJoin, Observable } from "rxjs"; import { map } from 'rxjs/operators'; ...
ffcabbar's user avatar
  • 373
0 votes
0 answers
207 views

I am using the following forkJoin to make preview call only for attachment that can be previewable. canPreview flag shows that. But as soon as I add the filter, it is throwing the following error. I ...
Mukil Deepthi's user avatar
0 votes
0 answers
41 views

I encountered a strange behaviour with forkJoin: @Input() userId; // userId is now defined forkJoin([ this.apiService.getUserProfile(this.userId), // userId is still defined this....
RoyBarOn's user avatar
  • 1,009
-1 votes
2 answers
287 views

Using the resources of the Fork-Join framework, create an asynchronous multithreaded system to form a collection of words of maximum length from three text files. How to find the longest words in all ...
Good Tomorroe's user avatar
0 votes
0 answers
400 views

So I am trying to understand how Java ForkJoin framework works. The simplest thing I could think of implementing was an array sum. However my parallel implementation is 3-4 times slower than the ...
aa8y's user avatar
  • 3,942
2 votes
1 answer
2k views

Code: final ForkJoinPool forkJoinPool = new ForkJoinPool(PARALLELISM_NUMBER); try { final List<Record> records = getRecrods(); List<...
shantanu's user avatar
  • 2,108

1
2 3 4 5
10