WordPress database error: [Table './ay6u3nor6dat6ba1/kn6_ayu1n9k4_5_actionscheduler_actions' is marked as crashed and last (automatic?) repair failed]
SELECT a.action_id FROM kn6_ayu1n9k4_5_actionscheduler_actions a WHERE 1=1 AND a.hook='aioseo_send_usage_data' AND a.status IN ('in-progress') ORDER BY a.scheduled_date_gmt ASC LIMIT 0, 1

WordPress database error: [Table './ay6u3nor6dat6ba1/kn6_ayu1n9k4_5_actionscheduler_actions' is marked as crashed and last (automatic?) repair failed]
SELECT a.action_id FROM kn6_ayu1n9k4_5_actionscheduler_actions a WHERE 1=1 AND a.hook='aioseo_send_usage_data' AND a.status IN ('pending') ORDER BY a.scheduled_date_gmt ASC LIMIT 0, 1

Passing Data to a Thread | Loop and Break

Passing Data to a Thread

The easiest way to pass arguments to a thread’s target method is to execute a lambda expression that calls the method with the desired arguments:

Example

using System;
using System.Threading;
namespace ConsoleApplication1
{
    class Program
    {
        static void Main()
        {
            Thread t = new Thread(();
            t.Start();
            Console.Read();
        }
        static void Print(string message)
        {
            Console.WriteLine(message);
        }
    }
}

Another technique is to pass an argument into Thread’s Start method:

Example

using System;
using System.Threading;
namespace ConsoleApplication1
{
    class Program
    {
        static void Main()
        {
            Thread t = new Thread(Print);
            t.Start("Hello from t!");
            Console.Read();
        }
        static void Print(object messageObj)
        {
            string message = (string)messageObj; // We need to cast here
            Console.WriteLine(message);
        }
    }
}
Share

You may also like...