pg_search

https://github.com/casecommons/pg_search

Ruby

pg_search builds ActiveRecord named scopes that take advantage of PostgreSQL’s full text search

Gitlab::Database::MultiThreadedMigration#with_multiple_threads

Starts a thread-pool for N threads, along with N threads each using a
single connection. The provided block is yielded from inside each
thread.

Example:

    with_multiple_threads(4) do
      execute('SELECT ...')
    end

thread_count - The number of threads to start.

join - When set to true this method will join the threads, blocking the
       caller until all threads have finished running.

Returns an Array containing the started threads.

Source | Google | Stack overflow

Edit

git clone [email protected]:casecommons/pg_search.git

cd pg_search

open

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Gitlab--Database--MultiThreadedMigration-with_multiple_threads-for-pr


# Commit to git

git add git commit -m "better docs for Gitlab::Database::MultiThreadedMigration#with_multiple_threads"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Gitlab--Database--MultiThreadedMigration-with_multiple_threads-for-pr

hub pull-request


# Celebrate!