6.1.16 news.ex

Search news pages

All this demo does is read several Web pages in parallel and report on the number of occurrences of a word or phrase. Each page is handled by a separate Euphoria task running in parallel with several other tasks.

6.1.16.1 Usage

eui news.ex string
or:

eui news.ex "a multi-word phrase"

Search is case insensitive.

This demo uses Euphoria's multitasking feature. It can run without change on all platforms supported by OpenEuphoria.

A Euphoria task is assigned to each instance URL query, searching the Web page text as it arrives. In this way, when a task is blocked due to a delayed response from a particular server, the program can easily switch to another task that is not blocked. The program quits after a period of 10-15 seconds with no progress made on any page.