Find Jobs
Hire Freelancers

Basic thread polling code in C#

$30-50 USD

処理中
投稿日: 12年近く前

$30-50 USD

完了時にお支払い
I need someone familiar with threads and thread polling in C# to write some pretty basic piece of code for me. There's a Form with a multiline TextBox, a Button and a StatusBar. User enters a few lines of text in the TextBox and clicks the Button. For each line in the TextBox I need a foo(line) method to be called BUT I want this to be done in multiple threads (max number of threads running at once should be hard-coded). Each thread should also increment a global counter variable / property of Form1 class (you need to be familiar with data monitoring/locking so that the value doesn't get wrong) and update the statusbar text with its value when it's finished. Basically, I need the following pseudocode translated into working C#: foreach(line in textbox) { if(number_of_running_threads == max_number_of_threads) { wait_until_there_is_a_free_thread(); } run_in_thread( foo(line) ); } You can leave the foo() body empty or put some random sleep() there or whatever. For an experienced C# dev this shouldn't take longer than an hour.
プロジェクト ID: 1692317

プロジェクトについて

1個の提案
リモートプロジェクト
アクティブ 12年前

お金を稼ぎたいですか?

Freelancerで入札する利点

予算と期間を設定してください
仕事で報酬を得る
提案をご説明ください
登録して仕事に入札するのは無料です
アワード者:
ユーザーアバター
will be done in 1 hour
$30 USD 0日以内
5.0 (72 レビュー)
6.3
6.3

クライアントについて

POLANDのフラグ
Katowice, Poland
5.0
2
メンバー登録日:7月 9, 2010

クライアント確認

このクライアントからの他の仕事

Long-term SEO for a new website in a specific niche
$30-500 USD
ありがとうございます!無料クレジットを受け取るリンクをメールしました。
メールを送信中に問題が発生しました。もう一度お試しください。
登録ユーザー 投稿された仕事の合計
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
プレビューを読み込み中
位置情報へのアクセスが許可されました。
あなたのログインセッションの有効期限がきれ、ログアウトされました。もう一度ログインしてください。