Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Thread Wait Issue

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

My Requirement: I have a METHOD which will take 2 input values. (1)I have to perform initial validations on that values and return to caller.
(2)Same time I have to start a new process with the input values. In the second process it will be calling different Webe services.

I implemented this code by using a after initial validation of inputs, I am starting a thread and return to caller. Inside the thread I am doing the (2) process.
I have written code to implement thread wait, to stop the thread after given break time is reached.

I want to return to caller once initial validation is completed. I want to continue this threa wait should be happen in backgroud.

ISSUE: The METHOD returning to caller after finishing all the process including process(2). It is taking lot of time to return to caller.
Can anybody please tell me how to resolve this issue?

I have written code like...



Please let me know if you need any more information.
Thanks,
Rakesh
 
Sheriff
Posts: 22004
107
Eclipse IDE Spring VI Editor Chrome Java Ubuntu Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please UseCodeTags in the future. I've added them for you this time; look how much easier it is to read your code.
 
Evacuate the building! Here, take this tiny ad with you:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic