From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NO_DNS_FOR_FROM,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) by gnuweeb.org (Postfix) with ESMTPSA id 16B6580A10 for ; Sun, 21 Aug 2022 22:29:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1661120959; bh=8NfxLbcTb0TYE4g2YEbzKphxeYCMHrDzt+WM8X9lXYE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=TOB7epI+oZwANvFaSul9yIV20e7Gtzw1hSneG93qHRQLFuMI9+xATNd21b7ggvFMC fxZrtWvXCM/VxkM9d0iB965OzbljASG2KR6EhnFzxFbgwv+0odvzFglrJdGk+LghmN 2mWAHLRZOfqztshoQsOZ0Sp+xaYG6FNATnmP/CF0Ea1MuoT8iWygNZYaT9he9Pavj0 DrsGaUW5XW5z2svJjHjIvE6pawqbXAZe3lkr7acVvGi6RPsSmnvQhzT8moyzwxjcf1 t4twvpQh+/eXF1BQOqEIzXUKQh98chAlSTyp2EvGixark170Lgr++kfc5bPfrBLoNW rgdH8/shIlW1A== Received: by mail-lf1-f46.google.com with SMTP id z6so12921876lfu.9 for ; Sun, 21 Aug 2022 15:29:18 -0700 (PDT) X-Gm-Message-State: ACgBeo0L9tGwz58J2bEtoYUMkXnf9sAexVjKG6ZSBok4vXedBYHYWnVp vkBMc36uRuud7ge2Mb1bMQl9HX/8cDxQZZv1UUQ= X-Google-Smtp-Source: AA6agR6puzrQ2nmPA9x5t8JftLx9PtwK+28S0QsuMA9GVoBTOHpkyCMF7yekWgGytgsw1yu8TIMhFc8Ph8tOZ9Y3PX8= X-Received: by 2002:a05:6512:3342:b0:48d:16e8:8fbc with SMTP id y2-20020a056512334200b0048d16e88fbcmr5818164lfd.655.1661120957145; Sun, 21 Aug 2022 15:29:17 -0700 (PDT) MIME-Version: 1.0 References: <20220821112453.3026255-1-ammarfaizi2@gnuweeb.org> <20220821112453.3026255-21-ammarfaizi2@gnuweeb.org> In-Reply-To: <20220821112453.3026255-21-ammarfaizi2@gnuweeb.org> From: Alviro Iskandar Setiawan Date: Mon, 22 Aug 2022 05:29:06 +0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v1 20/22] chnet: Use busy-waiting for signal waiter To: Ammar Faizi Cc: Muhammad Rizki , Kanna Scarlet , "GNU/Weeb Mailing List" Content-Type: text/plain; charset="UTF-8" List-Id: On Sun, Aug 21, 2022 at 6:24 PM Ammar Faizi wrote: > > Sometimes the worker stuck on sig.Wait(), it seems the signaling > mechanism was implemeted wrongly. Just use a busy-waiting which > is easier to implement. There is nothing to worry much about > wasting CPU cycle as the waiting period must be very short, if > it's not short, then something has gone very wrong! > > Also, PostTask() may fail, handle this failure. > > Signed-off-by: Ammar Faizi LGTM, busy spinning on this may reveal a real issue if PostTask() is doing something wrong. Several typos: s/implemeted/implemented/ s/CPU cycle/CPU cycles/ with that fixed: Acked-by: Alviro Iskandar Setiawan -- Viro