L
L
leistolz2016-03-23 19:17:23
PHP
leistolz, 2016-03-23 19:17:23

Is there a specific multithreading algorithm in PHP?

Hello, there is a bot for VK, for a small circle of conversations. So, it has some functions that take a long time to complete (2 seconds, no less), for example, checking the twitch channel (curl request to https://api.twitch.tv/kraken/streams/streamer_nickname , and displaying relevant information) and then I had a question, is it possible to make a separate thread execute this section of code, and the main one goes on to check incoming messages? I was looking for ways to implement multithreading, but I didn’t find anything sensible, then the libraries were not working, then the information was out of date.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
VovanZ, 2016-03-23
@VovanZ

In a specific case curl_multi can be used to execute multiple http requests asynchronously. You don't need multithreading here.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question