How can i use a background thread?

i need to use a background thread or just use anther thread beside the main thread
can i achieve something like this in ionic ?

This doesn’t really exist in Javascript (besides service workers, which its own can of worms).

May I ask what you want to achieve?

i wnat to make something like push notification , i will receive data from host and every 30 sec i will update and fetch it from server again
iknow i can use setinterval Function but the what about the performance ?

Doing something every 30 seconds, especially connections to a server, are the much bigger problem here. A background thread won’t help here.

You should really use proper push notifications for this.

1 Like

i know ,thank you for your help