Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    Erlang Progress Bar 1

    Download button

    No screenshots available
    Downloads: 443  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Luke Galea | More programs
    MIT/X Consortium Lic... / FREE
    August 28th, 2008, 11:52 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    Erlang Progress Bar description

    Even Better Progress Bars for Erlang

    Erlang Progress Bar is ann Erlang progress bar module. You should be able to have multiple processes notifying the progress bar of the completion of their task. The progress bar should notify those waiting for completion, etc. So - time for an update!

    Now you can start a progress bar server and easily run tasks in parallel. To see a sample use:

    progress_bar:example_processes( 1000, 10 ).

    That’s just starting a progress server and calling increment server:

    example_processes(N, P) ->
        start_server(”Example“, N),
        for(1, P, fun() -> spawn_link( fun() -> example_work_process(N div P) end ) end ),
        receive
            finished -> finished
        end.

    example_work_process(0) -> void;
    example_work_process(N) ->
        timer:sleep(100),
        increment_server(),
        example_work_process(N-1).

    for(N, N, F) -> [F()];
    for(I, N, F) -> [F()|for(I 1, N, F)]


    Dan Bravender was kind enough to point out that if we change the record name to the same as the module name we can use it in a more object oriented fashion… so PBar:finish instead of progress_bar:finish(PBar).

      


    TAGS:

    Erlang progress bar | Erlang module | Erlang | progress bar | Ruby

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM